
function formSubmit(obj){
	layer.load(1,{offset: '350px'});
	var content=$(obj);
	content.parents("form").submit();
}

function initPage(dataInfo){
	var basePath = $("#basePath").val();
	$("select:not([data-address])").each(function(){
		$(this).append("<option value=''>---请选择---</option>");
		
	});
	
	$("select[data-type='diseaseReportedCard']").each(function(){
		var options = "";
		options+="<option value='1'>已报</option>";
		options+="<option value='2'>未报</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
		
	});
	
	$("select[name='lastInHospitalIntervalCode']").each(function(){
		var options = "";
		options+="<option value='1'>当天</option>";
		options+="<option value='2'>2-15天</option>";
		options+="<option value='3'>16-31天</option>";
		options+="<option value='4'>大于31天</option>";
		$(this).append(options);
	});
	

	$("select[data-type='diagGrading']").each(function(){
		var options = "";
		options+="<option value='1'>临床分型分期</option>";
		options+="<option value='2'>细目</option>";
		options+="<option value='3'>亚目</option>";
		options+="<option value='4'>类目</option>";
		$(this).append(options);
	});         
	$("select[data-type='diagCompare1']").each(function(){
		var options = "";
		options+="<option value='1'>符合</option>";
		options+="<option value='2'>不符合</option>";
		options+="<option value='XA'>完全符合</option>";
		options+="<option value='XB'>细目符合</option>";
		options+="<option value='XC'>亚目符合</option>";
		options+="<option value='XD'>类目符合</option>";
		options+="<option value='9'>无对照</option>";
		$(this).append(options);
	});
	$("select[data-type='diagCompare2']").each(function(){
		var options = "";
		options+="<option value='1'>符合</option>";
		options+="<option value='2'>不符合</option>";
		options+="<option value='XA'>完全符合</option>";
		options+="<option value='XB'>细目符合</option>";
		options+="<option value='9'>无对照</option>";
		$(this).append(options);
	});
	
	$("select[data-type='antibacterialAgentsNumber']").each(function(){
		var options = "";
		options+="<option value='1'>单一</option>";
		options+="<option value='2'>二连</option>";
		options+="<option value='3'>三联</option>";
		options+="<option value='4'>四联及以上</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	
	
	
	$("select[data-type='129Select']").each(function(){
		var options = "";
		options+="<option value='1'>是</option>";
		options+="<option value='2'>否</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	$("select[data-type='antibacterialAgentsCategory']").each(function(){
		var options = "";
		options+="<option value='1'>一、二代头孢菌素</option>";
		options+="<option value='2'>其他类抗菌药物</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	$("select[data-type='preoperativeAntibacterialAgentsTime']").each(function(){
		var options = "";
		options+="<option value='1'>术前半小时</option>";
		options+="<option value='2'>术前1小时</option>";
		options+="<option value='3'>术前2小时</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	$("select[data-type='intraoperativeAddAntibacterialAgents']").each(function(){
		var options = "";
		options+="<option value='1'>术中出血量大于1500ml</option>";
		options+="<option value='2'>手术时间超过3小时</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	$("select[data-type='postoperationAntibacterialAgentsTime']").each(function(){
		var options = "";
		options+="<option value='1'>小于24小时</option>";
		options+="<option value='2'>24-48小时</option>";
		options+="<option value='3'>48-72小时</option>";
		options+="<option value='4'>大于72小时</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	$("select[data-type='transfuseWaterReactionType']").each(function(){
		var options = "";
		options+="<option value='1'>输液后空气栓塞</option>";
		options+="<option value='2'>输液后血管并发症</option>";
		options+="<option value='3'>输液后感染</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	$("select[data-type='untowardEffectReason']").each(function(){
		var options = "";
		options+="<option value='1'>正常使用有害效应</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	
	
	$("select[data-type='transfuseBloodReactionType']").each(function(){
		var options = "";
		options+="<option value='1'>输血后空气栓塞</option>";
		options+="<option value='2'>输血后血管并发症</option>";
		options+="<option value='3'>输血后感染</option>";
		options+="<option value='4'>ABO血型不配合性反应</option>";
		options+="<option value='5'>Rh不配合性反应</option>";
		options+="<option value='6'>血清过敏性休克</option>";
		options+="<option value='7'>血清反应性荨麻疹</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	$("select[data-type='nnis']").each(function(){
		var options = "";
		options+="<option value='0'>0级</option>";
		options+="<option value='1'>1级</option>";
		options+="<option value='2'>2级</option>";
		options+="<option value='3'>3级</option>";
		options+="<option value='4'>4级</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	
	
	
	
	$("select[data-type='tumorStaging']").each(function(){
		var options = "";
		options+="<option value='1'>Ⅰ期</option>";
		options+="<option value='2'>Ⅱ期</option>";
		options+="<option value='3'>Ⅲ期</option>";
		options+="<option value='4'>Ⅳ期</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	
	
	$("select[data-type='icuType']").each(function(){
		var options = "";
		options+="<option value='1'>心脏监护室(CCU)</option>";
		options+="<option value='2'>呼吸监护室(RICU)</option>";
		options+="<option value='3'>外科监护室(SICU)</option>";
		options+="<option value='4'>儿科监护室(PICU)</option>";
		options+="<option value='5'>神经科监护室（NICU）</option>";
		options+="<option value='6'>急诊监护室(EICU)</option>";
		options+="<option value='7'>重症监护室(ICU)</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	$("select[data-type='returnCriticalCareTime']").each(function(){
		var options = "";
		options+="<option value='1'>24h内</option>";
		options+="<option value='2'>24-48h</option>";
		options+="<option value='3'>＞48h</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	$("select[data-type='hemodialysisTreatmentWay']").each(function(){
		var options = "";
		options+="<option value='1'>普通血透</option>";
		options+="<option value='2'>高通量血液透析</option>";
		options+="<option value='3'>血液透析滤过</option>";
		options+="<option value='4'>血液滤过</option>";
		options+="<option value='5'>单纯超滤</option>";
		options+="<option value='6'>腹膜透析</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	$("select[data-type='vascularPathwayCategory']").each(function(){
		var options = "";
		options+="<option value='1'>动静脉内漏</option>";
		options+="<option value='2'>中心静脉血透导管</option>";
		options+="<option value='3'>动静脉直接穿刺</option>";
		options+="<option value='4'>其他血管通路</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	$("select[data-type='treatmentOutcome']").each(function(){
		var options = "";
		options+="<option value='1'>死亡</option>";
		options+="<option value='2'>血透转腹透</option>";
		options+="<option value='3'>血透转肾移植</option>";
		options+="<option value='4'>继续维持血透</option>";
		options+="<option value='9'>-</option>";
		$(this).append(options);
	});
	
	$("select").each(function(){
		$(this).change(function(){
	   		var eventObj = $(this);
	   		var nameObjName = eventObj.attr("name").replace("Code", "Name");
	   		
	   		if(eventObj.val()!=""){
	   			var name=eventObj.find("option:selected").text();
	   			eventObj.next("input[name='"+nameObjName+"']").val(name);
	   		}else{
	   			eventObj.next("input[name='"+nameObjName+"']").val("");
	   		}
	   });
	});
	
	$("input[type='radio']").each(function(){
		$(this).click(function(){
			 $(this).nextAll("input[name='"+$(this).attr("name").replace("Code", "Name")+"']").val($(this).attr("title"));
		});
		$(this).dblclick(function(){
			$(this).removeAttr("checked");
			$(this).nextAll("input[name='"+$(this).attr("name").replace("Code", "Name")+"']").val(null);
		});
	});
	
	if(dataInfo.infectiousDiseaseReportedCardCode){
	  	var selectedIndex = $("select[name='infectiousDiseaseReportedCardCode'] option[value='"+dataInfo.infectiousDiseaseReportedCardCode+"']").first().index();
		if (selectedIndex == -1) {
			var option = "<option selected value='" + dataInfo.infectiousDiseaseReportedCardCode + "'>" + dataInfo.infectiousDiseaseReportedCardName + "</option>";
			$("select[name='infectiousDiseaseReportedCardCode']").append(option);
		} else {
			$("select[name='infectiousDiseaseReportedCardCode']").get(0).selectedIndex = selectedIndex;
		}
	}
	$("select[name='infectiousDiseaseReportedCardCode']").next("input[name='infectiousDiseaseReportedCardName']").val(dataInfo.infectiousDiseaseReportedCardName);
	
	if(dataInfo.malignantTumorReportedCardCode){
	  	var selectedIndex = $("select[name='malignantTumorReportedCardCode'] option[value='"+dataInfo.malignantTumorReportedCardCode+"']").first().index();
		if (selectedIndex == -1) {
			var option = "<option selected value='" + dataInfo.malignantTumorReportedCardCode + "'>" + dataInfo.malignantTumorReportedCardName + "</option>";
			$("select[name='malignantTumorReportedCardCode']").append(option);
		} else {
			$("select[name='malignantTumorReportedCardCode']").get(0).selectedIndex = selectedIndex;
		}
	}
	$("select[name='malignantTumorReportedCardCode']").next("input[name='malignantTumorReportedCardName']").val(dataInfo.malignantTumorReportedCardName);
	
	if(dataInfo.chronicDiseaseReportedCardCode){
	  	var selectedIndex = $("select[name='chronicDiseaseReportedCardCode'] option[value='"+dataInfo.chronicDiseaseReportedCardCode+"']").first().index();
		if (selectedIndex == -1) {
			var option = "<option selected value='" + dataInfo.chronicDiseaseReportedCardCode + "'>" + dataInfo.chronicDiseaseReportedCardName + "</option>";
			$("select[name='chronicDiseaseReportedCardCode']").append(option);
		} else {
			$("select[name='chronicDiseaseReportedCardCode']").get(0).selectedIndex = selectedIndex;
		}
	}
	$("select[name='chronicDiseaseReportedCardCode']").next("input[name='chronicDiseaseReportedCardName']").val(dataInfo.chronicDiseaseReportedCardName);
	
	
	if(dataInfo.lastInHospitalIntervalCode){
	  	var selectedIndex = $("select[name='lastInHospitalIntervalCode'] option[value='"+dataInfo.lastInHospitalIntervalCode+"']").first().index();
		if (selectedIndex == -1) {
			var option = "<option selected value='" + dataInfo.lastInHospitalIntervalCode + "'>" + dataInfo.lastInHospitalIntervalName + "</option>";
			$("select[name='lastInHospitalIntervalCode']").append(option);
		} else {
			$("select[name='lastInHospitalIntervalCode']").get(0).selectedIndex = selectedIndex;
		}
	}
	$("select[name='lastInHospitalIntervalCode']").next("input[name='lastInHospitalIntervalName']").val(dataInfo.lastInHospitalIntervalName);
	
	if(dataInfo.whetherFitLastDiagCode){
	  	var selectedIndex = $("select[name='whetherFitLastDiagCode'] option[value='"+dataInfo.whetherFitLastDiagCode+"']").first().index();
		if (selectedIndex == -1) {
			var option = "<option selected value='" + dataInfo.whetherFitLastDiagCode + "'>" + dataInfo.whetherFitLastDiagName + "</option>";
			$("select[name='whetherFitLastDiagCode']").append(option);
		} else {
			$("select[name='whetherFitLastDiagCode']").get(0).selectedIndex = selectedIndex;
		}
	}
	$("select[name='whetherFitLastDiagCode']").next("input[name='whetherFitLastDiagName']").val(dataInfo.whetherFitLastDiagName);
	
	if(dataInfo.whetherUnPlanedRehospitalCode){
		$("input[name='whetherUnPlanedRehospitalCode'][value='"+dataInfo.whetherUnPlanedRehospitalCode+"']").attr("checked",true);
	}
	$("input[name='whetherUnPlanedRehospitalName']").val(dataInfo.whetherUnPlanedRehospitalName);
	
	if(dataInfo.whetherCriticalCasesCode){
		$("input[name='whetherCriticalCasesCode'][value='"+dataInfo.whetherCriticalCasesCode+"']").attr("checked",true);
	}
	$("input[name='whetherCriticalCasesName']").val(dataInfo.whetherUnPlanedRehospitalName);
	
	
	if(dataInfo.whetherDifficultyCasesCode){
		$("input[name='whetherDifficultyCasesCode'][value='"+dataInfo.whetherDifficultyCasesCode+"']").attr("checked",true);
	}
	$("input[name='whetherDifficultyCasesName']").val(dataInfo.whetherDifficultyCasesName);
	
	
	
	if(dataInfo.whetherMainDiagCorrectCode){
		$("input[name='whetherMainDiagCorrectCode'][value='"+dataInfo.whetherMainDiagCorrectCode+"']").attr("checked",true);
	}
	$("input[name='whetherMainDiagCorrectName']").val(dataInfo.whetherMainDiagCorrectName);
	
	if(dataInfo.mainDiagGradingCode){
	  	var selectedIndex = $("select[name='mainDiagGradingCode'] option[value='"+dataInfo.mainDiagGradingCode+"']").first().index();
		if (selectedIndex == -1) {
			var option = "<option selected value='" + dataInfo.mainDiagGradingCode + "'>" + dataInfo.mainDiagGradingName + "</option>";
			$("select[name='mainDiagGradingCode']").append(option);
		} else {
			$("select[name='mainDiagGradingCode']").get(0).selectedIndex = selectedIndex;
		}
	}
	$("select[name='mainDiagGradingCode']").next("input[name='mainDiagGradingName']").val(dataInfo.mainDiagGradingName);
	
	
	initAntibacterialAgents(dataInfo);
	initOperateInfection(dataInfo);
	initTransfusionMedicine(dataInfo);
	initUntowardEffect(dataInfo);
	initSurgical(dataInfo);
	initDiagAccord(dataInfo);
	initIntensiveCare(dataInfo);
	initHemodialysis(dataInfo);
	var validator = $("#medicalQualityControlInfoForm").validate({
		errorElement: "title",
		ignoreTitle: true,
		submitHandler : function(){
			return true;
		},
		rules:{
			'followUpClinicWeekNumber': {
				digits:true,
            	range:[1,1000]
            },
			'followUpClinicMonthNumber': {
				digits:true,
            	range:[1,1000]
            },
            'followUpClinicYearNumber': {
            	digits:true,
            	range:[1,1000]
            },
            'usedAntibioticsOfDay': {
            	digits:true,
            	range:[1,1000]
            },
            'operateInfectionInfo.firstIncisionUsedProphylacticAntibioticsOfDay': {
            	digits:true,
            	range:[1,1000]
            },
            'transfusionMedicineInfo.redBloodCellVolume': {
            	digits:true,
            	range:[1,1000]
            },
            'transfusionMedicineInfo.bloodPlateletVolume': {
            	digits:true,
            	range:[1,1000]
            },
            'transfusionMedicineInfo.plasmaVolume': {
            	digits:true,
            	range:[1,1000]
            },
            'transfusionMedicineInfo.wholeBloodVolume': {
            	digits:true,
            	range:[1,1000]
            },
            'transfusionMedicineInfo.autoBloodVolume': {
            	digits:true,
            	range:[1,1000]
            },
            'transfusionMedicineInfo.otherBloodVolume': {
            	digits:true,
            	range:[1,1000]
            },
            'intensiveCareInfo.intoICUTimes': {
            	digits:true,
            	range:[1,1000]
            },
            'intensiveCareInfo.apacheScore': {
            	digits:true,
            	range:[1,1000]
            },
            'intensiveCareInfo.usedBreathingMachineOfDay': {
            	digits:true,
            	range:[1,1000]
            },
            'intensiveCareInfo.usedBreathingMachineRaiseOfDay': {
            	digits:true,
            	range:[1,1000]
            },
            'intensiveCareInfo.usedArteriovenousCatheterOfDay': {
            	digits:true,
            	range:[1,1000]
            },
            'intensiveCareInfo.usedUrineCatheterOfDay': {
            	digits:true,
            	range:[1,1000]
            },
            'hemodialysisInfo.totalDay': {
            	digits:true,
            	range:[1,1000]
            }
			
		},
		
	});
	
	
}
/*抗菌药物使用*/
function initAntibacterialAgents(dataInfo){
	if(dataInfo.whetherUsedAntibioticsCode){
		$("input[name='whetherUsedAntibioticsCode'][value='"+dataInfo.whetherUsedAntibioticsCode+"']").attr("checked",true);
	}
	$("input[name='whetherUsedAntibioticsName']").val(dataInfo.whetherUsedAntibioticsName);
	$("input[name='usedAntibioticsOfDay']").val(dataInfo.usedAntibioticsOfDay);
	if(dataInfo.whetherUsedAntibacterialAgentsCode){
		$("input[name='whetherUsedAntibacterialAgentsCode'][value='"+dataInfo.whetherUsedAntibacterialAgentsCode+"']").attr("checked",true);
	}
	$("input[name='whetherUsedAntibacterialAgentsName']").val(dataInfo.whetherUsedAntibacterialAgentsName);
	
	if(dataInfo.usedAntibacterialAgentsOfNumberCode){
	  	var selectedIndex = $("select[name='usedAntibacterialAgentsOfNumberCode'] option[value='"+dataInfo.usedAntibacterialAgentsOfNumberCode+"']").first().index();
		if (selectedIndex == -1) {
			var option = "<option selected value='" + dataInfo.usedAntibacterialAgentsOfNumberCode + "'>" + dataInfo.usedAntibacterialAgentsOfNumberName + "</option>";
			$("select[name='usedAntibacterialAgentsOfNumberCode']").append(option);
		} else {
			$("select[name='usedAntibacterialAgentsOfNumberCode']").get(0).selectedIndex = selectedIndex;
		}
	}
	$("select[name='usedAntibacterialAgentsOfNumberCode']").next("input[name='usedAntibacterialAgentsOfNumberName']").val(dataInfo.usedAntibacterialAgentsOfNumberName);
	

	if(dataInfo.whetherAntibioticsInspectCode){
	  	var selectedIndex = $("select[name='whetherAntibioticsInspectCode'] option[value='"+dataInfo.whetherAntibioticsInspectCode+"']").first().index();
		if (selectedIndex == -1) {
			var option = "<option selected value='" + dataInfo.whetherAntibioticsInspectCode + "'>" + dataInfo.whetherAntibioticsInspectName + "</option>";
			$("select[name='whetherAntibioticsInspectCode']").append(option);
		} else {
			$("select[name='whetherAntibioticsInspectCode']").get(0).selectedIndex = selectedIndex;
		}
	}
	$("select[name='whetherAntibioticsInspectCode']").next("input[name='whetherAntibioticsInspectName']").val(dataInfo.whetherAntibioticsInspectName);
	

	if(dataInfo.whetherUsedSpecialAntibioticsCode){
	  	var selectedIndex = $("select[name='whetherUsedSpecialAntibioticsCode'] option[value='"+dataInfo.whetherUsedSpecialAntibioticsCode+"']").first().index();
		if (selectedIndex == -1) {
			var option = "<option selected value='" + dataInfo.whetherUsedSpecialAntibioticsCode + "'>" + dataInfo.whetherUsedSpecialAntibioticsName + "</option>";
			$("select[name='whetherUsedSpecialAntibioticsCode']").append(option);
		} else {
			$("select[name='whetherUsedSpecialAntibioticsCode']").get(0).selectedIndex = selectedIndex;
		}
	}
	$("select[name='whetherUsedSpecialAntibioticsCode']").next("input[name='whetherUsedSpecialAntibioticsName']").val(dataInfo.whetherUsedSpecialAntibioticsName);
	

	if(dataInfo.whetherUsedSpecialAntibioticsConsultationCode){
	  	var selectedIndex = $("select[name='whetherUsedSpecialAntibioticsConsultationCode'] option[value='"+dataInfo.whetherUsedSpecialAntibioticsConsultationCode+"']").first().index();
		if (selectedIndex == -1) {
			var option = "<option selected value='" + dataInfo.whetherUsedSpecialAntibioticsConsultationCode + "'>" + dataInfo.whetherUsedSpecialAntibioticsConsultationName + "</option>";
			$("select[name='whetherUsedSpecialAntibioticsConsultationCode']").append(option);
		} else {
			$("select[name='whetherUsedSpecialAntibioticsConsultationCode']").get(0).selectedIndex = selectedIndex;
		}
	}
	$("select[name='whetherUsedSpecialAntibioticsConsultationCode']").next("input[name='whetherUsedSpecialAntibioticsConsultationName']").val(dataInfo.whetherUsedSpecialAntibioticsConsultationName);
	
	
}

/*围手术期预防感染*/
function initOperateInfection(dataInfo){
	if(dataInfo.operateInfectionInfo){
		var operateInfectionInfo = dataInfo.operateInfectionInfo;
		if(operateInfectionInfo.whether1IncisionUsedProphylacticAntibioticsCode){
		  	var selectedIndex = $("select[name='operateInfectionInfo.whether1IncisionUsedProphylacticAntibioticsCode'] option[value='"+operateInfectionInfo.whether1IncisionUsedProphylacticAntibioticsCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + operateInfectionInfo.whether1IncisionUsedProphylacticAntibioticsCode+ "'>" + operateInfectionInfo.whether1IncisionUsedProphylacticAntibioticsName + "</option>";
				$("select[name='operateInfectionInfo.whether1IncisionUsedProphylacticAntibioticsCode']").append(option);
			} else {
				$("select[name='operateInfectionInfo.whether1IncisionUsedProphylacticAntibioticsCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='operateInfectionInfo.whether1IncisionUsedProphylacticAntibioticsCode']").next("input[name='operateInfectionInfo.whether1IncisionUsedProphylacticAntibioticsName']").val(operateInfectionInfo.whether1IncisionUsedProphylacticAntibioticsName);
		$("input[name='operateInfectionInfo.firstIncisionUsedProphylacticAntibioticsOfDay']").val(operateInfectionInfo.firstIncisionUsedProphylacticAntibioticsOfDay);
		
		if(operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTypeCode){
		  	var selectedIndex = $("select[name='operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTypeCode'] option[value='"+operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTypeCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTypeCode+ "'>" + operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTypeName + "</option>";
				$("select[name='operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTypeCode']").append(option);
			} else {
				$("select[name='operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTypeCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTypeCode']").next("input[name='operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTypeName']").val(operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTypeName);
		
		if(operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTimeCode){
		  	var selectedIndex = $("select[name='operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTimeCode'] option[value='"+operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTimeCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTimeCode+ "'>" + operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTimeName + "</option>";
				$("select[name='operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTimeCode']").append(option);
			} else {
				$("select[name='operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTimeCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTimeCode']").next("input[name='operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTimeName']").val(operateInfectionInfo.preoperativeProphylacticUsedAntibioticsTimeName);
	
		if(operateInfectionInfo.intraoperativeProphylacticSecondUsedAntibioticsCode){
		  	var selectedIndex = $("select[name='operateInfectionInfo.intraoperativeProphylacticSecondUsedAntibioticsCode'] option[value='"+operateInfectionInfo.intraoperativeProphylacticSecondUsedAntibioticsCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + operateInfectionInfo.intraoperativeProphylacticSecondUsedAntibioticsCode+ "'>" + operateInfectionInfo.intraoperativeProphylacticSecondUsedAntibioticsName + "</option>";
				$("select[name='operateInfectionInfo.intraoperativeProphylacticSecondUsedAntibioticsCode']").append(option);
			} else {
				$("select[name='operateInfectionInfo.intraoperativeProphylacticSecondUsedAntibioticsCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='operateInfectionInfo.intraoperativeProphylacticSecondUsedAntibioticsCode']").next("input[name='operateInfectionInfo.intraoperativeProphylacticSecondUsedAntibioticsName']").val(operateInfectionInfo.intraoperativeProphylacticSecondUsedAntibioticsName);
	
		if(operateInfectionInfo.whetherPostoperationProphylacticUsedAntibioticsCode){
		  	var selectedIndex = $("select[name='operateInfectionInfo.whetherPostoperationProphylacticUsedAntibioticsCode'] option[value='"+operateInfectionInfo.whetherPostoperationProphylacticUsedAntibioticsCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + operateInfectionInfo.whetherPostoperationProphylacticUsedAntibioticsCode+ "'>" + operateInfectionInfo.whetherPostoperationProphylacticUsedAntibioticsName + "</option>";
				$("select[name='operateInfectionInfo.whetherPostoperationProphylacticUsedAntibioticsCode']").append(option);
			} else {
				$("select[name='operateInfectionInfo.whetherPostoperationProphylacticUsedAntibioticsCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='operateInfectionInfo.whetherPostoperationProphylacticUsedAntibioticsCode']").next("input[name='operateInfectionInfo.whetherPostoperationProphylacticUsedAntibioticsName']").val(operateInfectionInfo.whetherPostoperationProphylacticUsedAntibioticsName);
	
		if(operateInfectionInfo.postoperationProphylacticUsedAntibioticsTimeCode){
		  	var selectedIndex = $("select[name='operateInfectionInfo.postoperationProphylacticUsedAntibioticsTimeCode'] option[value='"+operateInfectionInfo.postoperationProphylacticUsedAntibioticsTimeCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + operateInfectionInfo.postoperationProphylacticUsedAntibioticsTimeCode+ "'>" + operateInfectionInfo.postoperationProphylacticUsedAntibioticsTimeName + "</option>";
				$("select[name='operateInfectionInfo.postoperationProphylacticUsedAntibioticsTimeCode']").append(option);
			} else {
				$("select[name='operateInfectionInfo.postoperationProphylacticUsedAntibioticsTimeCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='operateInfectionInfo.postoperationProphylacticUsedAntibioticsTimeCode']").next("input[name='operateInfectionInfo.postoperationProphylacticUsedAntibioticsTimeName']").val(operateInfectionInfo.postoperationProphylacticUsedAntibioticsTimeName);
	
	}
}
/*输液/输血情况*/
function initTransfusionMedicine(dataInfo){
	var transfusionMedicineInfo = dataInfo.transfusionMedicineInfo;
	if(transfusionMedicineInfo){
		if(transfusionMedicineInfo.whetherTransfuseWaterCode){
			$("input[name='transfusionMedicineInfo.whetherTransfuseWaterCode'][value='"+transfusionMedicineInfo.whetherTransfuseWaterCode+"']").attr("checked",true);
		}
		$("input[name='transfusionMedicineInfo.whetherTransfuseWaterName']").val(transfusionMedicineInfo.whetherTransfuseWaterName);
		
		if(transfusionMedicineInfo.whetherTransfuseWaterReactionCode){
			$("input[name='transfusionMedicineInfo.whetherTransfuseWaterReactionCode'][value='"+transfusionMedicineInfo.whetherTransfuseWaterReactionCode+"']").attr("checked",true);
		}
		$("input[name='transfusionMedicineInfo.whetherTransfuseWaterReactionName']").val(transfusionMedicineInfo.whetherTransfuseWaterReactionName);
		
		if(transfusionMedicineInfo.transfuseWaterReactionTypeCode){
		  	var selectedIndex = $("select[name='transfusionMedicineInfo.transfuseWaterReactionTypeCode'] option[value='"+transfusionMedicineInfo.transfuseWaterReactionTypeCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + transfusionMedicineInfo.transfuseWaterReactionTypeCode + "'>" + transfusionMedicineInfo.transfuseWaterReactionTypeName + "</option>";
				$("select[name='transfusionMedicineInfo.transfuseWaterReactionTypeCode']").append(option);
			} else {
				$("select[name='transfusionMedicineInfo.transfuseWaterReactionTypeCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='transfusionMedicineInfo.transfuseWaterReactionTypeCode']").next("input[name='transfusionMedicineInfo.transfuseWaterReactionTypeName']").val(transfusionMedicineInfo.transfuseWaterReactionTypeName);
		
	}
}
/*意外情况/不良反应*/
function initUntowardEffect(dataInfo){
	var untowardEffectInfo = dataInfo.untowardEffectInfo;
	if(untowardEffectInfo){
		if(untowardEffectInfo.whetherDrugReactionCode){
			$("input[name='untowardEffectInfo.whetherDrugReactionCode'][value='"+untowardEffectInfo.whetherDrugReactionCode+"']").attr("checked",true);
		}
		$("input[name='untowardEffectInfo.whetherDrugReactionName']").val(untowardEffectInfo.whetherDrugReactionName);
		
		if(untowardEffectInfo.drugReactionCauseCode){
		  	var selectedIndex = $("select[name='untowardEffectInfo.drugReactionCauseCode'] option[value='"+untowardEffectInfo.drugReactionCauseCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + untowardEffectInfo.drugReactionCauseCode + "'>" + untowardEffectInfo.drugReactionCauseName + "</option>";
				$("select[name='untowardEffectInfo.drugReactionCauseCode']").append(option);
			} else {
				$("select[name='untowardEffectInfo.drugReactionCauseCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='untowardEffectInfo.drugReactionCauseCode']").next("input[name='untowardEffectInfo.drugReactionCauseName']").val(untowardEffectInfo.drugReactionCauseName);
		
		$("input[name='untowardEffectInfo.drugReactionDiagName']").val(untowardEffectInfo.drugReactionDiagName);
		
		$("input[name='untowardEffectInfo.drugReactionDiagCode']").val(untowardEffectInfo.drugReactionDiagCode);
		
		if(untowardEffectInfo.whetherAccidentalPneumothoraxCode){
			$("input[name='untowardEffectInfo.whetherAccidentalPneumothoraxCode'][value='"+untowardEffectInfo.whetherAccidentalPneumothoraxCode+"']").attr("checked",true);
		}
		$("input[name='untowardEffectInfo.whetherAccidentalPneumothoraxName']").val(untowardEffectInfo.whetherAccidentalPneumothoraxName);
		
		if(untowardEffectInfo.whetherAccidentalPunctureCode){
			$("input[name='untowardEffectInfo.whetherAccidentalPunctureCode'][value='"+untowardEffectInfo.whetherAccidentalPunctureCode+"']").attr("checked",true);
		}
		$("input[name='untowardEffectInfo.whetherAccidentalPunctureName']").val(untowardEffectInfo.whetherAccidentalPunctureName);
		
		if(untowardEffectInfo.whetherMedicalEquipReactionCode){
			$("input[name='untowardEffectInfo.whetherMedicalEquipReactionCode'][value='"+untowardEffectInfo.whetherMedicalEquipReactionCode+"']").attr("checked",true);
		}
		$("input[name='untowardEffectInfo.whetherMedicalEquipReactionName']").val(untowardEffectInfo.whetherMedicalEquipReactionName);
		
		if(untowardEffectInfo.medicalEquipReactionCauseCode){
		  	var selectedIndex = $("select[name='untowardEffectInfo.medicalEquipReactionCauseCode'] option[value='"+untowardEffectInfo.medicalEquipReactionCauseCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + untowardEffectInfo.medicalEquipReactionCauseCode + "'>" + untowardEffectInfo.medicalEquipReactionCauseName + "</option>";
				$("select[name='untowardEffectInfo.medicalEquipReactionCauseCode']").append(option);
			} else {
				$("select[name='untowardEffectInfo.medicalEquipReactionCauseCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='untowardEffectInfo.medicalEquipReactionCauseCode']").next("input[name='untowardEffectInfo.medicalEquipReactionCauseName']").val(untowardEffectInfo.medicalEquipReactionCauseName);
		
		$("input[name='untowardEffectInfo.medicalEquipReactionDiagName']").val(untowardEffectInfo.medicalEquipReactionDiagName);
		
		$("input[name='untowardEffectInfo.medicalEquipReactionDiagCode']").val(untowardEffectInfo.medicalEquipReactionDiagCode);
		
	}
}

function initSurgical(dataInfo){
	var surgicalInfo = dataInfo.surgicalInfo;
	if(surgicalInfo){
		if(surgicalInfo.whetherReturnOperatingRoomCode){
		  	var selectedIndex = $("select[name='surgicalInfo.whetherReturnOperatingRoomCode'] option[value='"+surgicalInfo.whetherReturnOperatingRoomCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + surgicalInfo.whetherReturnOperatingRoomCode + "'>" + surgicalInfo.whetherReturnOperatingRoomName + "</option>";
				$("select[name='surgicalInfo.whetherReturnOperatingRoomCode']").append(option);
			} else {
				$("select[name='surgicalInfo.whetherReturnOperatingRoomCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='surgicalInfo.whetherReturnOperatingRoomCode']").next("input[name='surgicalInfo.whetherReturnOperatingRoomName']").val(surgicalInfo.whetherReturnOperatingRoomName);
		
		if(surgicalInfo.whetherPostoperativeAnalgesiaCode){
		  	var selectedIndex = $("select[name='surgicalInfo.whetherPostoperativeAnalgesiaCode'] option[value='"+surgicalInfo.whetherPostoperativeAnalgesiaCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + surgicalInfo.whetherPostoperativeAnalgesiaCode + "'>" + surgicalInfo.whetherPostoperativeAnalgesiaName + "</option>";
				$("select[name='surgicalInfo.whetherPostoperativeAnalgesiaCode']").append(option);
			} else {
				$("select[name='surgicalInfo.whetherPostoperativeAnalgesiaCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='surgicalInfo.whetherPostoperativeAnalgesiaCode']").next("input[name='surgicalInfo.whetherPostoperativeAnalgesiaName']").val(surgicalInfo.whetherPostoperativeAnalgesiaName);
		
		if(surgicalInfo.whetherCPRCode){
		  	var selectedIndex = $("select[name='surgicalInfo.whetherCPRCode'] option[value='"+surgicalInfo.whetherCPRCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + surgicalInfo.whetherCPRCode + "'>" + surgicalInfo.whetherCPRName + "</option>";
				$("select[name='surgicalInfo.whetherCPRCode']").append(option);
			} else {
				$("select[name='surgicalInfo.whetherCPRCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='surgicalInfo.whetherCPRCode']").next("input[name='surgicalInfo.whetherCPRName']").val(surgicalInfo.whetherCPRName);
		
		if(surgicalInfo.whetherCPRSuccessfulCode){
		  	var selectedIndex = $("select[name='surgicalInfo.whetherCPRSuccessfulCode'] option[value='"+surgicalInfo.whetherCPRSuccessfulCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + surgicalInfo.whetherCPRSuccessfulCode + "'>" + surgicalInfo.whetherCPRSuccessfulName + "</option>";
				$("select[name='surgicalInfo.whetherCPRSuccessfulCode']").append(option);
			} else {
				$("select[name='surgicalInfo.whetherCPRSuccessfulCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='surgicalInfo.whetherCPRSuccessfulCode']").next("input[name='surgicalInfo.whetherCPRSuccessfulName']").val(surgicalInfo.whetherCPRSuccessfulName);
		
		if(surgicalInfo.whetherCPRToRoomCode){
		  	var selectedIndex = $("select[name='surgicalInfo.whetherCPRToRoomCode'] option[value='"+surgicalInfo.whetherCPRToRoomCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + surgicalInfo.whetherCPRToRoomCode + "'>" + surgicalInfo.whetherCPRToRoomName + "</option>";
				$("select[name='surgicalInfo.whetherCPRToRoomCode']").append(option);
			} else {
				$("select[name='surgicalInfo.whetherCPRToRoomCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='surgicalInfo.whetherCPRToRoomCode']").next("input[name='surgicalInfo.whetherCPRToRoomName']").val(surgicalInfo.whetherCPRToRoomName);
		
		if(surgicalInfo.whetherAnabiosisScoreMin4Code){
		  	var selectedIndex = $("select[name='surgicalInfo.whetherAnabiosisScoreMin4Code'] option[value='"+surgicalInfo.whetherAnabiosisScoreMin4Code+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + surgicalInfo.whetherAnabiosisScoreMin4Code + "'>" + surgicalInfo.whetherAnabiosisScoreMin4Name + "</option>";
				$("select[name='surgicalInfo.whetherAnabiosisScoreMin4Code']").append(option);
			} else {
				$("select[name='surgicalInfo.whetherAnabiosisScoreMin4Code']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='surgicalInfo.whetherAnabiosisScoreMin4Code']").next("input[name='surgicalInfo.whetherAnabiosisScoreMin4Name']").val(surgicalInfo.whetherAnabiosisScoreMin4Name);
		
		
		if(surgicalInfo.whetherWithTheOperationCode){
		  	var selectedIndex = $("select[name='surgicalInfo.whetherWithTheOperationCode'] option[value='"+surgicalInfo.whetherWithTheOperationCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + surgicalInfo.whetherWithTheOperationCode + "'>" + surgicalInfo.whetherWithTheOperationName + "</option>";
				$("select[name='surgicalInfo.whetherWithTheOperationCode']").append(option);
			} else {
				$("select[name='surgicalInfo.whetherWithTheOperationCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='surgicalInfo.whetherWithTheOperationCode']").next("input[name='surgicalInfo.whetherWithTheOperationName']").val(surgicalInfo.whetherWithTheOperationName);
		
		if(surgicalInfo.whetherNewSurgicalTechniquesCode){
		  	var selectedIndex = $("select[name='surgicalInfo.whetherNewSurgicalTechniquesCode'] option[value='"+surgicalInfo.whetherNewSurgicalTechniquesCode+"']").first().index();
			if (selectedIndex == -1) {
				var option = "<option selected value='" + surgicalInfo.whetherNewSurgicalTechniquesCode + "'>" + surgicalInfo.whetherNewSurgicalTechniquesName + "</option>";
				$("select[name='surgicalInfo.whetherNewSurgicalTechniquesCode']").append(option);
			} else {
				$("select[name='surgicalInfo.whetherNewSurgicalTechniquesCode']").get(0).selectedIndex = selectedIndex;
			}
		}
		$("select[name='surgicalInfo.whetherNewSurgicalTechniquesCode']").next("input[name='surgicalInfo.whetherNewSurgicalTechniquesName']").val(surgicalInfo.whetherNewSurgicalTechniquesName);
		
		selectValue("surgicalInfo.whetherOperationProblems10Code",surgicalInfo.whetherOperationProblems10Code,
				"surgicalInfo.whetherOperationProblems10Name",surgicalInfo.whetherOperationProblems10Name);
		
		selectValue("surgicalInfo.surgicalSiteInfectionCode",surgicalInfo.surgicalSiteInfectionCode,
				"surgicalInfo.surgicalSiteInfectionName",surgicalInfo.surgicalSiteInfectionName);
		
	}
}

function initDiagAccord(dataInfo){
	var diagAccordInfo = dataInfo.diagAccordInfo;
	if(diagAccordInfo){
		radioValue("diagAccordInfo.whetherMalignancyPatientCode",diagAccordInfo.whetherMalignancyPatientCode
				,"diagAccordInfo.whetherMalignancyPatientName",diagAccordInfo.whetherMalignancyPatientName);
		selectValue("diagAccordInfo.malignantTumorHighestDiagBasisCode",diagAccordInfo.malignantTumorHighestDiagBasisCode,
				"diagAccordInfo.malignantTumorHighestDiagBasisName",diagAccordInfo.malignantTumorHighestDiagBasisName);
		
		selectValue("diagAccordInfo.tumorStagingCode",diagAccordInfo.tumorStagingCode,
				"diagAccordInfo.tumorStagingName",diagAccordInfo.tumorStagingCode);
		
		selectValue("diagAccordInfo.malignantTumorDiffCode",diagAccordInfo.malignantTumorDiffCode,
				"diagAccordInfo.malignantTumorDiffName",diagAccordInfo.malignantTumorDiffName);
		
		selectValue("diagAccordInfo.malignantTumorHighestDiagBasisCode",diagAccordInfo.malignantTumorHighestDiagBasisCode,
				"diagAccordInfo.malignantTumorHighestDiagBasisName",diagAccordInfo.malignantTumorHighestDiagBasisName);
		
		selectValue("diagAccordInfo.diagAccordA01Code",diagAccordInfo.diagAccordA01Code,
				"diagAccordInfo.diagAccordA01Name",diagAccordInfo.diagAccordA01Name);
		
		selectValue("diagAccordInfo.diagAccordA02Code",diagAccordInfo.diagAccordA02Code,
				"diagAccordInfo.diagAccordA02Name",diagAccordInfo.diagAccordA02Name);
		
		selectValue("diagAccordInfo.diagAccordA03Code",diagAccordInfo.diagAccordA03Code,
				"diagAccordInfo.diagAccordA03Name",diagAccordInfo.diagAccordA03Name);
		
		selectValue("diagAccordInfo.diagAccordA04Code",diagAccordInfo.diagAccordA04Code,
				"diagAccordInfo.diagAccordA04Name",diagAccordInfo.diagAccordA04Name);
		
		selectValue("diagAccordInfo.diagAccordA05Code",diagAccordInfo.diagAccordA05Code,
				"diagAccordInfo.diagAccordA05Name",diagAccordInfo.diagAccordA05Name);
		
		selectValue("diagAccordInfo.diagAccordA06Code",diagAccordInfo.diagAccordA06Code,
				"diagAccordInfo.diagAccordA06Name",diagAccordInfo.diagAccordA06Name);
		
		selectValue("diagAccordInfo.diagAccordA07Code",diagAccordInfo.diagAccordA07Code,
				"diagAccordInfo.diagAccordA07Name",diagAccordInfo.diagAccordA07Name);
		
		selectValue("diagAccordInfo.diagAccordA08Code",diagAccordInfo.diagAccordA08Code,
				"diagAccordInfo.diagAccordA08Name",diagAccordInfo.diagAccordA08Name);
		
		selectValue("diagAccordInfo.diagAccordA09Code",diagAccordInfo.diagAccordA09Code,
				"diagAccordInfo.diagAccordA09Name",diagAccordInfo.diagAccordA09Name);
		
		
		selectValue("diagAccordInfo.diagAccordA10Code",diagAccordInfo.diagAccordA10Code,
				"diagAccordInfo.diagAccordA10Name",diagAccordInfo.diagAccordA10Name);
		
		selectValue("diagAccordInfo.diagAccordA11Code",diagAccordInfo.diagAccordA11Code,
				"diagAccordInfo.diagAccordA11Name",diagAccordInfo.diagAccordA11Name);
		
		selectValue("diagAccordInfo.diagAccordA12Code",diagAccordInfo.diagAccordA12Code,
				"diagAccordInfo.diagAccordA12Name",diagAccordInfo.diagAccordA12Name);
		
	}
}


function initIntensiveCare(dataInfo){
	var intensiveCareInfo = dataInfo.intensiveCareInfo;
	if(intensiveCareInfo){
		
		selectValue("intensiveCareInfo.usedBreathingMachineCode",intensiveCareInfo.usedBreathingMachineCode,
				"intensiveCareInfo.usedBreathingMachineName",intensiveCareInfo.usedBreathingMachineName);
		
		$("input[name='intensiveCareInfo.usedBreathingMachineOfDay']").val(intensiveCareInfo.usedBreathingMachineOfDay);
		
		selectValue("intensiveCareInfo.problem1Code",intensiveCareInfo.problem1Code,
				"intensiveCareInfo.problem1Name",intensiveCareInfo.problem1Name);
		$("input[name='intensiveCareInfo.usedBreathingMachineRaiseOfDay']").val(intensiveCareInfo.usedBreathingMachineRaiseOfDay);
		
		selectValue("intensiveCareInfo.usedArteriovenousCatheterCode",intensiveCareInfo.usedArteriovenousCatheterCode,
				"intensiveCareInfo.usedArteriovenousCatheterName",intensiveCareInfo.usedArteriovenousCatheterName);
		
		$("input[name='intensiveCareInfo.usedArteriovenousCatheterOfDay']").val(intensiveCareInfo.usedArteriovenousCatheterOfDay);
		
		selectValue("intensiveCareInfo.problem2Code",intensiveCareInfo.problem2Code,
				"intensiveCareInfo.problem2Name",intensiveCareInfo.problem2Name);
		
		selectValue("intensiveCareInfo.usedUrineCatheterCode",intensiveCareInfo.usedUrineCatheterCode,
				"intensiveCareInfo.usedUrineCatheterName",intensiveCareInfo.usedUrineCatheterName);
		
		$("input[name='intensiveCareInfo.usedUrineCatheterOfDay']").val(intensiveCareInfo.usedUrineCatheterOfDay);
		
		selectValue("intensiveCareInfo.problem3Code",intensiveCareInfo.problem3Code,
				"intensiveCareInfo.problem3Name",intensiveCareInfo.problem3Name);
		
	}
}


/*抗菌药物使用*/
function initHemodialysis(dataInfo){
	var hemodialysisInfo = dataInfo.hemodialysisInfo;
	if(hemodialysisInfo){
		selectValue("hemodialysisInfo.whetherHemodialysisCode",hemodialysisInfo.whetherHemodialysisCode,
				"hemodialysisInfo.whetherHemodialysisName",hemodialysisInfo.whetherHemodialysisName);
		selectValue("hemodialysisInfo.treatmentWayCode",hemodialysisInfo.treatmentWayCode,
				"hemodialysisInfo.treatmentWayName",hemodialysisInfo.treatmentWayName);
		selectValue("hemodialysisInfo.vascularPathwayCategoryCode",hemodialysisInfo.vascularPathwayCategoryCode,
				"hemodialysisInfo.vascularPathwayCategoryName",hemodialysisInfo.vascularPathwayCategoryName);
		$("input[name='hemodialysisInfo.totalDay']").val(hemodialysisInfo.totalDay);
		selectValue("hemodialysisInfo.bloodPressureRange1Code",hemodialysisInfo.bloodPressureRange1Code,
				"hemodialysisInfo.bloodPressureRange1Name",hemodialysisInfo.bloodPressureRange1Name);
		selectValue("hemodialysisInfo.whetherBloodInfectionCode",hemodialysisInfo.whetherBloodInfectionCode,
				"hemodialysisInfo.whetherBloodInfectionName",hemodialysisInfo.whetherBloodInfectionName);
		selectValue("hemodialysisInfo.turnToYang1Code",hemodialysisInfo.turnToYang1Code,
				"hemodialysisInfo.turnToYang1Name",hemodialysisInfo.turnToYang1Name);
		
		selectValue("hemodialysisInfo.turnToYang2Code",hemodialysisInfo.turnToYang2Code,
				"hemodialysisInfo.turnToYang2Name",hemodialysisInfo.turnToYang2Name);
		selectValue("hemodialysisInfo.whetherComplicationCode",hemodialysisInfo.whetherComplicationCode,
				"hemodialysisInfo.whetherComplicationName",hemodialysisInfo.whetherComplicationName);
		selectValue("hemodialysisInfo.treatmentOutcomeCode",hemodialysisInfo.treatmentOutcomeCode,
				"hemodialysisInfo.treatmentOutcomeName",hemodialysisInfo.treatmentOutcomeName);
	}
}

function selectValue(codeName,codeValue,nameName,nameValue){
	if(codeValue){
	  	var selectedIndex = $("select[name='"+codeName+"'] option[value='"+codeValue+"']").first().index();
		if (selectedIndex == -1) {
			var option = "<option selected value='" + codeValue + "'>" + nameValue + "</option>";
			$("select[name='"+codeName+"']").append(option);
		} else {
			$("select[name='"+codeName+"']").get(0).selectedIndex = selectedIndex;
		}
	}
	$("select[name='"+codeName+"']").next("input[name='"+nameName+"']").val(nameValue);
}

function radioValue(codeName,codeValue,nameName,nameValue){
	if(codeValue){
		$("input[name='"+codeName+"'][value='"+codeValue+"']").attr("checked",true);
	}
	$("input[name='"+nameName+"']").val(nameValue);
}